<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script type="text/javascript">
        var arr = [];
        document.write("向数组中写入数据：");
        arr.push(1, 2, 3, 4);
        document.write(arr.length);
        document.write("<br/>" + arr.join(","));
        arr.reverse();
        document.write("<br/>" + arr.join(","));
    </script>
</head>
<body>

</body>
</html>